package org.lixiong.seralizable;

public class test05 {

	public static void main(String[] args) {
		Father f = new Child();
		System.out.println(f.x);

		System.out.println("-------------------------");
		
		
		String a1 = "abcd";
		String a2 = "abcd";
		System.out.println(a1 == a2);
		a2.toUpperCase();
		System.out.println(a1 == a2);

		String b1 = "abcd";
		String b2 = "ab" + "cd";
		System.out.println(b1 == b2);

		String c1 = "abcd";
		String c21 = "cd";
		String c2 = "ab" + c21;
		System.out.println(c1 == c2);

		String d1 = new String("abcd");
		String d2 = new String("abcd");
		System.out.println(d1 == d2);
	}
}

class Father {
	int x = 10;

	public Father() {
		add(20);
	}

	public void add(int y) {
		System.out.println("Father");
		x += y;
	}
}

class Child extends Father {

	int x = 9;

	@Override
	public void add(int y) {
		System.out.println("Child");
		x += y;
		System.out.println(x + ":  :" + y);
	}
}
